package com.example.boot.modules.system.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author 王令
 * @since 2022/12/17
 */
@Data
public class ResetPasswordDto {

    @NotBlank(message = "手机号格式不正确")
    @Pattern(regexp = "1[0-9]{10}", message = "手机号格式不正确")
    private String phone;

    @Size(min = 6, max = 6, message = "验证码不正确")
    private String code;

    @NotBlank(message = "密码长度要求6-16位")
    @Size(min = 6, max = 16, message = "密码长度要求6-16位")
    private String password;
}
